class CreateEcards < ActiveRecord::Migration
  def self.up
    create_table :ecards do |t|
      t.column :user_id,    :integer, :null => false
      t.column :image_id,   :integer, :null => false
      t.column :from_name,  :string
      t.column :from_email, :string, :null => false
      t.column :to_name,    :string
      t.column :to_email,   :string, :null => false
      t.column :message,    :text
      t.column :code,       :integer, :null => false
    end
  end

  def self.down
    drop_table :ecards
  end
end
